<?php

if($type!='rule' && $type!='reset' && $type!='articles') {
	include_once('blocks/slider.php');
	include_once('blocks/user_info.php');
	include_once('blocks/chat.php');
	
	if(!@$type || $type=='wall'){ include_once('blocks/wall.php'); include_once('blocks/news.php'); }
	elseif($type=='photos') include_once('blocks/photo_album.php');
	elseif($type=='friend') include_once('blocks/friend.php');
	elseif($type=='information') include_once('blocks/information.php');
	elseif($type=='all-pic') include_once('blocks/photo_all.php');
	elseif($type=='traloi') include_once('blocks/friend_traloi.php');
	elseif($type=='detail'){ include_once('blocks/detail.php'); include_once('blocks/news.php'); }
	elseif($type=='ketban'){
		$tc->ketban($idUser,$user);
		header('location:http://'.$domain.'/index.html?user='.$user);
	}else include_once('blocks/error.php');
}elseif($type=='articles') include_once('blocks/articles.php');
elseif($type=='rule') include_once('blocks/rules.php');
elseif($type=='reset') include_once('blocks/resetpass.php');
?>
<script type="text/javascript">
$(document).ready(function() {
	$('body').css('background','#ffeff3 url(images/user_bg.jpg) repeat-x top');
	//<![CDATA[
	$(document).ready(function(){
		var documentHeight = ($(document).height());
		var bottomHeight=500;
		var msie6=$.browser=='msie'&&$.browser.version<7;
		if(!msie6){
			var top=$('#floatDiv,#floatDiv2').offset().top-parseFloat($('#floatDiv,#floatDiv2').css('margin-top').replace(/auto/,0));
			$(window).scroll(function(event){
				var y=$(this).scrollTop();
				if((y>=top)&&(y<=(documentHeight-bottomHeight))){
					$('#floatDiv,#floatDiv2').addClass('fixed');
				}else if(y<500){
					$('#floatDiv,#floatDiv2').removeClass('fixed');
				}
			});
		}
	});//]]>
});
</script>